home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 August / Macworld (1999-08).dmg / From Macworld Readers / FREE Scripts / FREE Guides / FREE Guide Electronic Music / FREE Guide • Electronic M….sea / FREE Guide • Electronic Music.rsrc / TEXT_138.txt < prev    next >
Text File  |  1995-07-26  |  13KB  |  263 lines

  1.  
  2. Appendix E
  3.  
  4. The MIDI Messages in Detail
  5. qqqqqqqqqqqqqqqqqqqqq
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. Status Bytes and Data Bytes
  32. wwwwwwwwwwwwww
  33.  
  34. All MIDI information is in blocks, each consisting of a Status Byte ‚Äî really a MIDI command ‚Äî followed by the appropriate number of Data Bytes.
  35.  
  36. Any byte with a value equal to or greater than 128 (hex 80) is a Status Byte. The most significant nibble conveys the ‚Äòcommand‚Äô ‚Äî such as Note On.
  37. Additional data, such as the MIDI Channel Number, is usually carried in the least significant nibble and in subsequent Data Bytes. There are 128 kinds of Status Byte: from 128 (hex 80) to 255 (hex FF).
  38.  
  39. Any byte with a value of 127 (hex 7F) or less is a Data Byte. It transmits supplementary information associated with Status Bytes ‚Äî such as Note Number or Key Velocity.
  40.  
  41.  
  42. Channel Messages
  43. wwwwwwwww
  44.  
  45. Every instrument in a MIDI system will have one or more Channel Numbers ‚Äî within the range 1 to 16. This numbering allows sequencers and other devices to direct their information to a particular instrument (or voice within an instrument) by means of a Channel Message.
  46.  
  47. In most instances the user is free to assign any voice to any Channel Number. Some equipment ‚Äî usually of the General MIDI (GM) variety ‚Äî may assign sounds automatically.
  48.  
  49. Simple instruments may only ‚Äòsound‚Äô one voice at a time ‚Äî hence they only need one MIDI channel. But multi-timbral machines can ‚Äòsound‚Äô any number of voices at once ‚Äî they can use as many channels as can be assigned to voices. The lowest numbered MIDI channel is then called the Basic Channel ‚Äî this is used to convey information which is not specific to a voice.
  50.  
  51.  
  52. Channel Messages are divided into Channel Voice Messages and Channel Mode Messages:
  53.  
  54.  
  55. Channel Voice Messages ‚Äî the Basics
  56. wwwwwwwwwwwwwwwwww
  57.  
  58.  
  59.                                                           
  60.  
  61.  
  62.                                                               Channel Voice Messages control the 
  63.                                                               instrument‚Äôs voices ‚Äî only instruments or 
  64.                                                               voices assigned to the appropriate MIDI 
  65.                                                               channel will respond.
  66.  
  67.  
  68.  
  69.  
  70. Running Status may be used to reduce the number of bytes needed to convey this information. This improves speed, which is rather crucial for musical timing! It allows a string of data bytes to follow a single status byte without any other status bytes being sent. The Note On status byte may be followed by any number of note on or note off data bytes ‚Äî the latter are actually note on bytes with their velocity (the pressure applied to a key) set to zero.
  71.  
  72.  
  73. Voices may respond in one of several Modes:-
  74.  
  75. Monophonic Mode (Mono): only one sound is triggered via a single MIDI channel ‚Äî no further sounds will play until the first has ceased. This unusual mode may appear on analogue instruments fitted with MIDI converters.
  76.  
  77. Omniphonic Mode (Omni): only one sound can be triggered by each MIDI channel ‚Äî ‚Äòpolyphony‚Äô requires several channels, so this mode is rare.
  78.  
  79. Polyphonic Mode (Poly): multiple sounds, usually with the same voice, are triggered from a single MIDI channel ‚Äî the usual mode for modern machines.
  80. This Basic Channel may default to channel 1 or may be selected by the master controls on the instrument.
  81. Some devices may need to be switched to Multi mode in order to use the Basic Channel.
  82. The MIDI standard specifies that instruments should default to Poly mode with Omni on. That means it should be able to receive via any MIDI channel and also able to play polyphonically from any channel. In practice most devices are polyphonic, but only receive from selected channels.
  83.  
  84.  
  85. ‚Äû   Nphony indicates how many sounds an instrument can play simultaneously 
  86.       ‚Äî exceeding this number will cause voices to truncate (usually on the 
  87.      basis of first in, first out).
  88.  
  89. ‚Äû   Not all drum machines provide pitched sounds ‚Äî different sounds may be 
  90.      played by different notes on the controlling MIDI keyboard.
  91.  
  92. ‚Äû   Whilst recording a sequence the musician must be able to hear it! 
  93.      Inevitably the keyboard is on a different MIDI channel to the instrument. 
  94.      Hence many sequencers will replace the channel number in the keyboard 
  95.      Voice Messages by that of the instrument ‚Äî this is called Auto-channelising.
  96.  
  97.  
  98. Channel Voice Messages ‚Äî in Detail
  99. wwwwwwwwwwwwwwwww
  100.  
  101.  ¬†
  102.  
  103.  
  104.                                                                Channel Voice Messages contain the MIDI 
  105.                                                                channel within the status byte.
  106.  
  107.                                                                All messages, except Channel Pressure, use 
  108.                                                                two data bytes, the first specifying the note
  109.                                                                number, the second indicating key-pressure 
  110.                                                                or velocity.
  111.  
  112.  
  113. The Channel Voice messages are:-
  114.  
  115.  
  116. Note Off: a key (note) has been released. 
  117. The second data byte indicates the speed of release (off velocity) and is rarely used.
  118.  
  119.  
  120. Note On (with running status): a key (note) has been pressed. 
  121. The second data byte, giving the applied pressure (on velocity) should use a log scale.
  122.  
  123.  
  124. Polyphonic Key Pressure or After Touch: pressure has been applied to an individual key. This is rarely used.
  125.  
  126.  
  127. Channel Pressure (After Touch): pressure has been applied to the keyboard. 
  128. This is often used in preference to Poly Key Pressure. It is not specific to any particular key being pressed and uses a single data byte to convey the pressure data.
  129.  
  130.  
  131. Channel Mode Messages
  132. wwwwwwwwwwww
  133.  
  134. ¬† 
  135.  
  136.  
  137.                                                              Channel Mode Messages tell an instrument 
  138.                                                              how to respond to Voice Messages ‚Äî they are
  139.                                                              sent over the instrument‚Äôs Basic Channel.
  140.                                                              For devices which respond to notes on any 
  141.                                                              number of MIDI channels this will usually 
  142.                                                              be the lowest numbered channel.
  143.  
  144.  
  145.  
  146. Mode messages may be used to control a ‚Äòcommon‚Äô parameters in a device  ‚Äî such as volume. Although most devices only use one Basic Channel it is quite feasible to use two or more - allowing an instrument to behave as two or more separate synthesisers, or to expand the range of controls available via MIDI.
  147.  
  148.  
  149. The messages are:-
  150.  
  151.  
  152. Control Change (with running status): a controller or switch has moved.
  153. Four data bytes are used to specify any one of 64 continuous controllers (14-bit) and 36 switches.
  154.  
  155. The following controllers are permanently assigned ‚Äî 
  156.  
  157. Breath controller (1), foot pedal (4), portamento time control (5), data entry slider (6) and main volume (7). Note that earlier instruments may confuse (4) and (7)!
  158.  
  159. The last 4 switches are used for sustain, portamento, sostenuto and soft pedals.
  160.  
  161. There are also another 28 controllers (7-bit), data increment and decrement buttons, two parameter controllers (14-bit), controllers reset switch, local control switch (to separate an instrument from its own keyboard) and switches to set the Mode or to send an All Notes Off command.
  162.  
  163. The 14-bit controller values are split into most and least significant bytes, using a log scale. They can be used in a non-standard form for mixing console automation ‚Äî the maximum capacity is 64 7-bit faders (with 0.8 dB resolution) or 32 14-bit faders, plus switches
  164.  
  165.  
  166. Program Change: a voice or patch has been selected. A single data byte carries the program number.
  167.  
  168.  
  169. Pitch Bend Change: the bend controller has moved. Two data bytes are used to convey the 14-bit data ‚Äî the least significant byte (LSB) is sent first.
  170.  
  171.  
  172. System Common Messages
  173. wwwwwwwwwwwww
  174.  
  175.  
  176.  
  177.  
  178.                                                                  System Common Messages are sent and 
  179.                                                                  received irrespective of MIDI channels.
  180.  
  181.                                                                  They are designed to be received by all  
  182.                                                                  devices in a MIDI system ‚Äî assuming 
  183.                                                                  they can make use of them!
  184.  
  185.  
  186.  
  187.  
  188.  
  189. The System Common Messages are:-
  190.  
  191.  
  192. MIDI Timecode (MTC) Quarter Frame Message: the current position of SMPTE timecode. 100 messages are sent per second, using only 7.5% of MIDI bandwidth. Timecode is contained in a data byte spread over 8 messages ‚Äî hence a full update only occurs on every second frame of timecode.
  193.  
  194.  
  195. Song Position Pointer: a count of MIDI beats elapsed as a sequencer plays its song. Two data bytes are used ‚Äî the least significant byte (LSB) is sent first.
  196.  
  197.  
  198. Song Select: selects the song to be played by a sequencer. A single data byte conveys the song number.
  199.  
  200.  
  201. Tuning Request: This is rarely used.
  202.  
  203.  
  204. End of System Exclusive (EOX): the System Exclusive data has ended.
  205. See below.
  206.  
  207.  
  208. Real Time Messages
  209. wwwwwwwwww
  210.  
  211. ¬†                                                                                                                                                                                                                                                              Real Time Messages are sent and received 
  212.                                                                   irrespective of MIDI channels and have the 
  213.                                                                   highest timing priority.
  214.  
  215.                                                                   They can be interposed between any bytes, 
  216.                                                                   perhaps separating status bytes from their 
  217.                                                                   data, or even placed in the middle of 
  218.                                                                   running status information. 
  219.  
  220.                                                                   Real Time Messages do not contain data 
  221.                                                                   bytes.
  222.  
  223.  
  224. The messages are:-
  225.  
  226.  
  227. Timing Clock: these ‚Äòpulses‚Äô drive a sequencer at a rate of six clocks per MIDI Beat. There are 16 Beats or 96 Clocks per whole-note (semi-breve). The Song Position Pointer counts these beats during a sequence. 
  228.  
  229.  
  230. Start , Stop and Continue: instructions to a sequencer.
  231.  
  232.  
  233. Active Sensing: for silencing instruments when MIDI cables are disconnected.
  234. This feature is optional. Any instrument that receives this signal will expect another every 300 milliseconds. If it fails to appear the receiver turns off all voices.
  235.  
  236.  
  237. System Reset: all instruments to be restored to normal. This is implemented by the user, but not automatically at ‚Äòpower up‚Äô.
  238.  
  239.  
  240. System Exclusive Messages
  241. wwwwwwwwwwww
  242.  
  243. ¬†                                                                            Most System Exclusive Messages are 
  244.                                                                              specific to particular equipment ‚Äî 
  245.                                                                              the manufacturer determines the 
  246.                                                                              rules. The messages contain a 
  247.                                                                              manufacturer‚Äôs identification 
  248.                                                                              number (ID) to match the 
  249.                                                                              appropriate protocol. They are often 
  250.                                                                              used for voice editing or remote 
  251.                                                                              control of synthesisers.
  252.  
  253.  
  254. System Exclusive information must be aimed at particular piece of equipment, even when two identical devices share the same MIDI circuit. Hence instruments are assigned a Device ID ‚Äî this often corresponds to the Basic Channel number.
  255.  
  256. Two special IDs are used for the Universal System Exclusive messages, available to any device (this feature is not controlled by any one manufacturer!).
  257.  
  258. The first ID is for messages used to ‚Äòcue‚Äô sequencers or to dump audio samples via MIDI. The latter is a slow process, taking around ten times the duration of the sample.
  259.  
  260. The second ID indicates MIDI Timecode (MTC) Full Frame or MTC User Bit messages.
  261.  
  262.  
  263. ¬©Ray White 1995. All Rights Reserved.